/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.text.SimpleDateFormat;

/**
 * <p>Project: javase - Num11
 * <p>Powered by webrx On 2021-11-22 14:40:51
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Num11 {
    public static void main(String[] args) {
        System.out.println(2 & 3); //2 位与运算
        System.out.println(Integer.toBinaryString(2));
        //10
        // 0000 0010 2
        // 0000 0010 & 0000 0011  = 0000 0010 (2)
        // 0000 0011 3
        // 0000 0010 2

        System.out.println(2 == 2 & 3 == 1); //false 逻辑与 不短路

        System.out.println(3 >> 1 << 3);
        //3 0000 0011 >> 1
        //3 0000 0001 >> 1 << 3
        //  0000 1000
        System.out.println(0b1000);


    }
}
